package org.ru.mse10.cvis.entity.cv;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.ru.mse10.cvis.entity.misc.DateRange;
import org.ru.mse10.cvis.entity.misc.Identity;

/**
 * The Class OtherExpirience.
 */
@Entity
@Table(name = "other_expirience")
public class OtherExpirience extends Identity {

	/** The range. */
	private DateRange range;

	/** The description. */
	private String description;

	/** The cv data. */
	private CvData cvData;

	/**
	 * Gets the range.
	 * 
	 * @return the range
	 */
	@OneToOne(cascade = CascadeType.ALL)
	public DateRange getRange() {
		return range;
	}

	/**
	 * Sets the range.
	 * 
	 * @param range
	 *            the new range
	 */
	public void setRange(DateRange range) {
		this.range = range;
	}

	/**
	 * Gets the description.
	 * 
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Sets the description.
	 * 
	 * @param description
	 *            the new description
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * Gets the cv data.
	 * 
	 * @return the cv data
	 */
	@ManyToOne
	public CvData getCvData() {
		return cvData;
	}

	/**
	 * Sets the cv data.
	 * 
	 * @param cvData
	 *            the new cv data
	 */
	public void setCvData(CvData cvData) {
		this.cvData = cvData;
	}

}
